package com.generalbackend.role.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

/**
* ClassName: RestApi
* @Description 接口表实体类
* @author tim.xie
* @date 2021-12-14 13:19
*/

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_rest_api")
public class RestApi  {
	/**
	 * 
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;
	/**
	 * 名称
	 */
    @TableField("name")
    private String name;
	/**
	 * 请求方法
	 */
    @TableField("method")
    private String method;
	/**
	 * 请求地址
	 */
    @TableField("url")
    private String url;
	/**
	 * 描述
	 */
    @TableField("description")
    private String description;
	/**
	 * 是否为所有角色共享,是:1，否:0
	 */
    @TableField("is_all")
    private Integer isAll;
	/**
	 * 是否为公共接口,是1，否0
	 */
    @TableField("is_common")
    private Integer isCommon;
	/**
	 * 创建时间
	 */
    @TableField("create_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
	/**
	 * 更新时间
	 */
    @TableField("gmt_modified")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date gmtModified;


}